import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// @ts-ignore
import {getRootPath,getSrcPath} from "./build/utils";


const  srcPath = getSrcPath()
const rootPath =getRootPath()

export default defineConfig({
  plugins: [vue()],
  base: '/picc/',
  server: {
    proxy: {
      '/piccAPI': {
        target:'http://127.0.0.1:82',
        // target: 'https://zzjtpp.top',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/piccAPI/, '')
      }
    }
  },
  resolve:{
    alias:{
      '@':srcPath,
      '~':rootPath
    }
  },
  build:{
    outDir:'picc'
  }
})
